package ntd.util.modular.data.controller;

import io.swagger.annotations.Api;

import ntd.util.config.common.controller.BaseMybatisController;
import ntd.util.modular.data.entity.DataAcquisitionRule;
import ntd.util.modular.data.service.DataAcquisitionRuleService;
import ntd.util.modular.data.util.UtilDataAcquisitionManager;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = {"数据中心-数据采集规则管理"})
@RestController
@RequestMapping("/data/acquisition-rule")
public class DataAcquisitionRuleController extends BaseMybatisController<DataAcquisitionRule, DataAcquisitionRuleService> {

    @Override
    public void afterAdd(DataAcquisitionRule obj) {
        UtilDataAcquisitionManager.updateRule(obj);
    }

    @Override
    public void afterEdit(DataAcquisitionRule view) {
        UtilDataAcquisitionManager.updateRule(view);
    }
}
